forked from openbmc/bmcweb
-
Notifications
You must be signed in to change notification settings - Fork 0
systems.hpp - initial multi-host implementation #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mox669
wants to merge
32
commits into
master
Choose a base branch
from
dev/multi-host-impl
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2b0ba60
to
af944a1
Compare
pointbazaar
reviewed
Feb 27, 2024
af944a1
to
ea01c9b
Compare
28045c1
to
d5b9425
Compare
d5b9425
to
d60c35a
Compare
2e50134
to
c885511
Compare
411fc52
to
54989b9
Compare
To better organize the docs and align with other repos [1],[2],[3],[4] create a folder for documentation. Links between the docs have been adjusted to match their new place. References: [1] https://github.com/openbmc/phosphor-logging/tree/master/docs [2] https://github.com/openbmc/entity-manager/tree/master/docs [3] https://github.com/openbmc/libpldm/tree/main/docs [4] https://github.com/openbmc/sdbusplus/tree/master/docs Change-Id: Ibf990d0d78548bc3407b7f98ccf6a650b1744939 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
Update description for redfish-updateservice-use-dbus meson option. As this feature is enabled, drop the temporary and timeline related statements. Change-Id: Ie81faeed53f1db7bbd001d9b489d9ea1cb43810f Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
e153400
to
0bd2cdc
Compare
Implements GET and PATCH support for ServiceIdentification in Managers/bmc and service root. Tested: - Refish Service Validator passes - Tested on romulus: 1. GET initial value ``` curl -k "https://$BMC/redfish/v1" { ... } ``` ServiceIdentification is not yet present in service root, as expected ``` curl -k -H "X-Auth-Token: $XAUTH_TOKEN" "https://$BMC/redfish/v1/Managers/bmc" { ... "ServiceIdentification": "", ... } ``` 2. PATCH and GET with valid value ``` curl -k -X PATCH "https://$BMC/redfish/v1/Managers/bmc" -H "X-Auth-Token: $XAUTH_TOKEN" \ -H 'Content-Type: application/json' --data-raw '{"ServiceIdentification": "foo"}' { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The request completed successfully.", "MessageArgs": [], "MessageId": "Base.1.19.Success", "MessageSeverity": "OK", "Resolution": "None." } ] } curl -k "https://$BMC/redfish/v1" { ... "ServiceIdentification": "foo", ... } curl -k -H "X-Auth-Token: $XAUTH_TOKEN" "https://$BMC/redfish/v1/Managers/bmc" { ... "ServiceIdentification": "foo", ... } ``` 3. PATCH and GET with invalid value ``` curl -k -X PATCH "https://$BMC/redfish/v1/Managers/bmc" -H "X-Auth-Token: $XAUTH_TOKEN" \ -H 'Content-Type: application/json' --data-raw '{"ServiceIdentification": "$$$"}' { "ServiceIdentification@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The value provided for the property ServiceIdentification is not valid.", "MessageArgs": [ "ServiceIdentification" ], "MessageId": "Base.1.19.PropertyValueError", "MessageSeverity": "Warning", "Resolution": "Correct the value for the property in the request body and resubmit the request if the operation failed." } ] } curl -k -X PATCH "https://$BMC/redfish/v1/Managers/bmc" -H "X-Auth-Token: $XAUTH_TOKEN" \ -H 'Content-Type: application/json' --data-raw '{"ServiceIdentification": "2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222"}' { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The string 'ServiceIdentification' exceeds the length limit 99.", "MessageArgs": [ "ServiceIdentification", "99" ], "MessageId": "Base.1.19.StringValueTooLong", "MessageSeverity": "Warning", "Resolution": "Resubmit the request with an appropriate string length." } ], "code": "Base.1.19.StringValueTooLong", "message": "The string 'ServiceIdentification' exceeds the length limit 99." } } curl -k "https://$BMC/redfish/v1" { ... "ServiceIdentification": "foo", ... } curl -k -H "X-Auth-Token: $XAUTH_TOKEN" "https://$BMC/redfish/v1/Managers/bmc" { ... "ServiceIdentification": "foo", ... } ``` Change-Id: I5b71a73e947ec64cabb8d93c8503a18fb43b8937 Signed-off-by: Corey Ethington <cethington@coreweave.com>
These arrays should not be populated if there are no handlers for these configured. Fixes openbmc#105 Change-Id: Idbd04eb97ced75e44de6ed98aa1f0d410f0aebc7 Signed-off-by: Ed Tanous <etanous@nvidia.com>
Systemd's packageconfig file has both `systemdsystemunitdir` and `systemd_system_unit_dir` defined. The non-underscore one appears to be a deprecated alias[1]. Move to the non-deprecated / underscore-separated variant. [1]: systemd/systemd@4908de4 Change-Id: I7bf9b444aa8f04eb2b8ded05e502fee47e903639 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Http2 support in bmcweb has been relatively stable for a while. The http2 implementation passes all known Redfish tests (some of which require ported to httpx to support http2), the UI loads, and so far as the project is concerned, is a complete improvement over the existing http1 stack. This commit removes the experimental classification from http2, and declares it ready for production use, while enabling it by default. note, that enabling this by default only makes the server advertise that http2 is available. Http2 must still be supported by the client to enable ALPN negotiation, so existing http1 clients that only support http1 will continue to function as they did before. Tested: Enabled http option and saw http2 advertised, http2 now takes effect. Change-Id: I92843a3afc532f0b2a64904bb872e5d84a1a54fe Signed-off-by: Ed Tanous <etanous@nvidia.com>
SubordinateOverrides: This commit automates the creation of SubordinateOverrides privileges structures from the redfish privilege registry. In addition, it enhances the function of parse_registries.py. It reads SubordinateOverrides privilege registry from DMTF and generates const defines SubordinateOverrides for all the privilege registry entries in the same format that the Privileges struct accepts. Moreover, it generates unique const defines for all SubordinateOverrides target levels. Ex: EthernetInterface SubordinateOverrides has two "Targets": ["Manager", "EthernetInterfaceCollection"]. So parse_registries.py generates two unique const 1) Subordinate override for Manager -> EthernetInterface 2) Subordinate override for Manager -> EthernetInterfaceCollection -> EthernetInterface Note: if SubordinateOverrides privilege gets changed, then it automatically updates that route privilege, but if SubordinateOverrides target gets changed, then the user needs to update that manually. Fix Log_services privileges: In Log_services, some of the privileges not following the Redfish_1.1.0_PrivilegeRegistry registry. This commit contains the following LogServices privileges. 1) POST method ``` ComputerSystem -> LogServiceCollection -> LogService - POST /redfish/v1/Systems/<str>/LogServices/EventLog/Actions/LogService.ClearLog/ - POST /redfish/v1/Systems/<str>/LogServices/Dump/Actions/LogService.CollectDiagnosticData/ - POST /redfish/v1/Systems/<str>/LogServices/Dump/Actions/LogService.ClearLog/ - POST /LogServices/PostCodes/Actions/LogService.ClearLog/ ``` 2) DELETE method ``` ComputerSystem -> LogServiceCollection -> LogService -> LogEntryCollection -> LogEntry - DELETE /redfish/v1/Systems/<str>/LogServices/EventLog/Entries/<str>/ ``` This commit also changes the current privilege 1) ConfigureManager to ConfigureComponents. ``` DELETE /redfish/v1/Systems/<str>/LogServices/EventLog/Entries/<str> ``` 2) ConfigureCompnents -> ConfigureManager ``` POST /redfish/v1/Systems/<str>/LogServices/Dump/Actions/LogService.ClearLog/ POST /redfish/v1/Systems/<str>/LogServices/EventLog/Actions/LogService.ClearLog/ POST /redfish/v1/Systems/<str>/LogServices/Dump/Actions/LogService.CollectDiagnosticData/ ``` Tested: manually tested on Witherspoon system, there is no change in output. Run Redfish validator, with all different Privileges; Error Get: UUID: String '' does not match pattern '' this commit doesn't affect UUID Email sent to openbmc list: https://lists.ozlabs.org/pipermail/openbmc/2021-August/027232.html Change-Id: I37d8a2882f1cfaa59a482083f180fdd0805e2e7d Signed-off-by: Abhishek Patel <Abhishek.Patel@ibm.com> Signed-off-by: Myung Bae <myungbae@us.ibm.com>
As the 'experimental-redfish-multi-computer-system' flag is actively used for development the expiry has been extended. Tested: Inspection only Change-Id: I1bbf635a04b87ec59ec2eaabb01173258187092e Signed-off-by: Oliver Brewka <oliver.brewka@9elements.com>
4b6d9dc
to
4d21a36
Compare
Given the size of Redfish schemas these days, it would be nice to be able to store them on disk in a zstd format. Unfortunately, not all clients support zstd at this time. This commit implements reading of zstd files from disk, as well as decompressing zstd in the case where the client does not support zstd as a return type. Tested: Implanted an artificial zstd file into the system, and observed correct decompression both with an allow-encoding header of empty string and zstd. Change-Id: I8b631bb943de99002fdd6745340aec010ee591ff Signed-off-by: Ed Tanous <etanous@nvidia.com>
4d21a36
to
eddae0d
Compare
During the transition to using phosphor-settings-defaults-native for setting the software version, the version field may temporarily be empty. This change lowers the log severity for that case to avoid unnecessary warnings during expected intermediate states. ''' Jun 20 02:41:49 bmc bmcwebd[709]: [error_messages.cpp:1248] Internal Error /usr/src/debug/bmcweb/1.0+git/redfish-core/include/utils/sw_utils.hpp(126:32) `void redfish::sw_util::afterGetProperties(const std::shared_ptr<bmcweb::AsyncResp>&, const std::string&, bool, const std::string&, const std::string&, bool, const boost::system::error_code&, const dbus::utility::DBusPropertiesMap&)`: ''' Change-Id: I9123278f863fcf04107b42a5996ccb725c1bd870 Signed-off-by: Daniel Hsu <Daniel-Hsu@quantatw.com>
eddae0d
to
a6188f5
Compare
Take advantage of nesting meson files in directories to make things more readable. e.g. file path literals become shorter. Tested: tests still build and pass. Change-Id: I20cca4f35fb326df33a337bdbadb9811b78962a7 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
Modify get/set of LocationIndicatorActive property for Chassis to use identifying association instead of hard-coding D-Bus path to led group.[1] History: Almost 5 years ago IBM added support for this property to the Chassis.[2] That original implementation assumed 1 chassis and just looked at the enclosure_identify_blink and enclosure_identify like the existing IndicatorLED property did. IBM renamed these functions getSystemLocationIndicatorActive and setSystemLocationIndicatorActive.[3] These functions are also used by the system resource. The interest from other companies has mostly been around IndicatorLED (old deprecated LED property).[4] Today, LEDs have the association documented above and used elsewhere like PowerSupplies, Fans, etc. Switching to this association: 1) follows the design 2) allows multiple chassis support 3) doesn't assume your system led is your chassis led. In the future: 1) system should also move to this association design 2) IndicatorLED should be deprecated - it has been 5 years This could be put behind a compile flag but this function is broken with the assumption the system/chassis are the same led. Let's just move to the new design. IBM drove all these changes in and although other companies have shown interest around LEDs in Redfish, there hasn't been much in OpenBMC, so let's just fix. [1] https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/58299 [2] https://gerrit.openbmc.org/c/openbmc/bmcweb/+/36886 [3] https://gerrit.openbmc.org/c/openbmc/bmcweb/+/57765 [4] https://gerrit.openbmc.org/c/openbmc/bmcweb/+/40969 Tested: - Redfish Service Validator passes - Confirm able to set and get LED 1. Get for Chassis ``` curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Chassis/chassis { "@odata.id": "/redfish/v1/Chassis/chassis", "@odata.type": "#Chassis.v1_22_0.Chassis", ... "LocationIndicatorActive": false, ... } ``` 2. Set for Chassis ``` curl -k -H "X-Auth-Token: $token" H "Content-Type: application/json" -X PATCH -d '{"LocationIndicatorActive":true}' https://${bmc}/redfish/v1/Chassis/chassis curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Chassis/chassis { "@odata.id": "/redfish/v1/Chassis/chassis", "@odata.type": "#Chassis.v1_22_0.Chassis", ... "LocationIndicatorActive": true, ... } ``` Change-Id: I78d07f82a8bbf91adb84e53178d3344ba95c9a14 Signed-off-by: Janet Adkins <janeta@us.ibm.com>
Change-Id: Ie481aa8b05903dab59f39a1134463ac0c54aa781
Change-Id: I5cbd3aff607567651ad7caddcf999d95d222a0c5
Change-Id: Iaf9c1c01d44189707579b468f309577df3b6fad5
Change-Id: I5f2511939501d88fd700bcbffcfd810776d6a5b4
This change adds multi-host support in manager.hpp. Mainly returning all valid redfish links for the ManagerForServers array. In addition we opt out of calling getMainChassisId when on multi-host. Needs more clarification what exactly should be returned for that, if anything. Testing: TBD Change-Id: Ia73cabc23cd87128a59df5c7b16af0bf87462925 Signed-off-by: Oliver Brewka <oliver.brewka@9elements.com>
Add support for multi-host to get a valid collection upon requesting /redfish/v1/Systems/{computerSystemId}/LogServices/ redfish resource. All multi-host supported redfish URIs can be found in this listing: https://gerrit.openbmc.org/c/openbmc/bmcweb/+/76118 Tested: Redfish service validation succeeded on romulus and yosemite4. In addition the route has been curled to see if the correct collection is returned. Change-Id: Ic01cdfb18e1c219bf1fc2e0343a45d8ca5d4fa0a Signed-off-by: Oliver Brewka <oliver.brewka@9elements.com>
Add support for multi-host for all GET and POST method requests under /redfish/v1/Systems/{computerSystemId}/LogServices/PostCodes/ redfish resource. Tested: Redfish-service-validation passes on single-host machine as well as on yv4 in qemu. Every postcode entry is displayed in web-ui on single-host and shown in the curl output when requested on yv4 qemu. POST has been tested on single-host hardware inside web-ui and yv4 qemu machine with curl. (Postcodes have been copied over to the qemu machine manually from a single-host machine). No regressions observed. The postcode dir for the specific host is cleared successfully on both single- and multi-host machine after the POST. Change-Id: Ie04cb160a1f2756a04be68e6675a6cecc5f09117 Signed-off-by: Oliver Brewka <oliver.brewka@9elements.com>
Add support for multi-host for all GET and POST method requests under /redfish/v1/Systems/{computerSystemId}/LogServices/HostLogger/ redfish resource. Testing: TBD Change-Id: I026be8106f2accbb77d8d40749f502f3162ad04b Signed-off-by: Oliver Brewka <oliver.brewka@9elements.com>
a6188f5
to
58ae26f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
BMCWEB multi-host implementation
In order to support class 1 multi-host server configurations (i.e. yosemite v3, 1 BMC, N hosts), this change enables bmcweb to gather information on multiple available hosts and handle the information accordingly.
The implementation is based on an already taken - and now abondened - effort from earlier this year as can be seen on gerrit:
The current changes are only a subset of the patches to come, to fully implement multi host support.
Reviewing
The bmcweb devs wrote a document on common errors. Since I am new to cpp, I might misunderstood or unintentionally ignored one or two of these common errors. Might be good to have a look at the document and have it ready for reviewing.
Testing
NOTE: real hardware testing hasn't been performed yet!
Changes were tested in QEMU with the romulus image by IBM. After successful compilation of bmcweb on local machine,
the resulting patch file has been appended to the yocto build system in
meta-ibm/meta-romulus/recipes-phosphor/interfaces/bmcweb
.In general, all Redfish routes touched by the change need to be tested - for both - single-host- and multi-host-configuration to ensure that we don't break the single-host configuration. This means, we have to test the implementation twice (enabling/ disabling -Dexperimental-redfish-multi-computer-system in bmcweb_%.bbappend).
In order to automate this process to some extend, the
scripts/test-all-routes.sh
curls every route for you, and stores the response in a file that you have to specify as argument to the script. Afterwards you have to compare the response to the expected output:Expected response
Expected response single host
Expected response multi host
Response of local testing in QEMU
Response single host
GET /redfish/v1/Systems
GET /redfish/v1/Systems/system
GET /redfish/v1/Systems/system0
GET /redfish/v1/Systems/system1
GET /redfish/v/fileSystems/sysem0
GET /redfish/v1/Systems/foobar
GET /redfish/v1/Systems/system/ResetActionInfo
GET /redfish/v1/Systems/system0/ResetActionInfo
GET /redfish/v1/Systems/system1/ResetActionInfo
GET /redfish/v1/Systems/sysem0/ResetActionInfo
GET /redfish/v1/Systems/foobar/ResetActionInfo
POST /redfish/v1/Systems/system/Actions/ComputerSystem.Reset
POST /redfish/v1/Systems/system0/Actions/ComputerSystem.Reset
POST /redfish/v1/Systems/system1/Actions/ComputerSystem.Reset
POST /redfish/v1/Systems/sysem0/Actions/ComputerSystem.Reset
POST /redfish/v1/Systems/foobar/Actions/ComputerSystem.Reset
Response multi host
GET /redfish/v1/SystemsGET /redfish/v1/Systems/system
GET /redfish/v1/Systems/system0
GET /redfish/v1/Systems/system1
GET /redfish/v/fileSystems/sysem0
GET /redfish/v1/Systems/foobar
GET /redfish/v1/Systems/system0/ResetActionInfo
GET /redfish/v1/Systems/system1/ResetActionInfo
GET /redfish/v1/Systems/sysem0/ResetActionInfo
GET /redfish/v1/Systems/foobar/ResetActionInfo
POST /redfish/v1/Systems/system/Actions/ComputerSystem.Reset
POST /redfish/v1/Systems/system0/Actions/ComputerSystem.Reset
POST /redfish/v1/Systems/system1/Actions/ComputerSystem.Reset
POST /redfish/v1/Systems/sysem0/Actions/ComputerSystem.Reset
POST /redfish/v1/Systems/foobar/Actions/ComputerSystem.Reset